﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="right" Runat="Server">
    <p class="UserName">
        <strong>请输入房间类型：</strong><asp:TextBox ID="tbSeart" runat="server"></asp:TextBox>
        &nbsp;&nbsp;
        <asp:ImageButton ID="imgbtnSearch" runat="server" CausesValidation="False" ImageUrl="~/image/searchbutton.gif" OnClick="imgbtnSearch_Click"  />
    </p>
    <p class="UserName">
        &nbsp;</p>
    <p class="UserName">
        &nbsp;</p>
    <p class="UserName">
        <asp:GridView ID="gvProduct" runat="server" AllowPaging="True"
             AutoGenerateColumns="false" 
            OnPageIndexChanging="gvProduct_PageIndexChanging"
             PagerSettings-Mode="NextPrevious" PageSize="4" Width="100%" OnSelectedIndexChanging="gvProduct_SelectedIndexChanging" >
            <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPrevious"
                 NextPageText="下一页" Position="TopAndBottom" PreviousPageText="下一页" />
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <table style="border: 1px solid #ccc; width: 100%;">
                            <tr>
                            <td rowspan="7" style="text-align: center; border: 1px; vertical-align: middle; width: 40%;">
                                <asp:Image ID="imgProduct" runat="server" Height="100px" ImageUrl='<%# Bind("Image") %>' Width="100px" />
                            </td>
                                <td style="border: 1px solid #808080; width: 40%;">房间号： </td>
                                <td style="border: 1px solid #808080; width: 20%;">
                                    <asp:Label ID="lblProductId" runat="server" Text='<%# Bind("G_number") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #808080;">价格： </td>
                                <td style="border: 1px solid #808080;">
                                    <asp:Label ID="lblName" runat="server" ForeColor="Red" Text='<%# Bind("G_price") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #808080;">房间类型： </td>
                                <td style="border: 1px solid #808080;">
                                    <asp:Label ID="lblListPrice" runat="server" Text='<%# Bind("G_type") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #808080;">押金： </td>
                                <td style="border: 1px solid #808080;">
                                    <asp:Label ID="lblUnitCost" runat="server" Text='<%# Bind("G_money") %>'></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="G_number" DataNavigateUrlFormatString="~/Car.aspx?ProductId={0}" DataTextFormatString="{0:c}" HeaderText="预定" Text="预定" />
            </Columns>
        </asp:GridView>
    </p>
</asp:Content>

